package m4d2;

import java.util.stream.Stream;
//Map方法   将流的数据映射到另一个流
public class qMap {
    public static void main(String[] args) {
        Stream<String> stream = Stream.of("1", "22", "333", "4444");

        //map参数是Function接口
        Stream<Integer> stream1 = stream.map((String str)->{
            return Integer.parseInt(str);
        });

        stream1.forEach(i-> System.out.println(i));
    }
}
